﻿/*------------------------------------------------
// File Description: ProductViaSiteBadReason DataBase Entity
// Author:			 Crane
// Create Time:		 2020-10-25 18:31:42
//------------------------------------------------*/

using System;
using System.Data.Entity;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace IOA.MES.DataAccess.Entity
{
    /// <summary>
    /// 组件异常
    /// </summary>
    [Table(nameof(ProductViaSiteBadReason))]
    public class ProductViaSiteBadReason : BaseEntity
    {
        private string _barCode = string.Empty;
        private string _badReasonCode = string.Empty;
        private string _badTypeCode;

        #region Public Property

        ///<Summary>
        /// 组件条码
        ///</Summary>
        public string BarCode
        {
            get { return string.IsNullOrWhiteSpace(_barCode) ? string.Empty : _barCode; }
            set { _barCode = value; }
        }

        ///<Summary>
        /// 判定站点
        ///</Summary>
        public Enum.JudgeType JudgeType { get; set; }

        ///<Summary>
        /// 判定ID
        ///</Summary>
        public int JudgeId { get; set; }

        ///<Summary>
        /// 异常大类代码
        ///</Summary>
        public string BadTypeCode
        {
            get { return string.IsNullOrWhiteSpace(_badTypeCode) ? string.Empty : _badTypeCode; }
            set { _badTypeCode = value; }
        }

        ///<Summary>
        /// 异常代码
        ///</Summary>
        public string BadReasonCode
        {
            get { return string.IsNullOrWhiteSpace(_badReasonCode) ? string.Empty : _badReasonCode; }
            set { _badReasonCode = value; }
        }
        #endregion
    }

    public partial class MESContext
    {
        /// <summary>
        /// 
        /// </summary>
        public virtual DbSet<ProductViaSiteBadReason> ProductViaSiteBadReasons { get; set; }
    }
}